package demo4;

public class Test {
    public static void main(String[] args) {
        MyArray<Integer> myArray = new MyArray<>();
        myArray.setVal(0,10);
        System.out.println(myArray.getPos(0));
        MyArray<Number> myArray1 = new MyArray<>();
        //MyArray<String> myArray1 = new MyArray<>();//报错
    }
}
